﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Framework.Platform.Components.UI.Field
{
    public interface IField
    {
        #region 事件
        /// <summary>
        /// 
        /// </summary>
        event EventHandler<FieldFocusEventArgs> FieldFocus;
        #endregion

        #region 变量与属性
        /// <summary>
        /// 获取或设置字段的关键字
        /// </summary>
        string FieldKey { get; set; }
        /// <summary>
        /// 获取或设置字段的数据源
        /// </summary>
        object FieldDataSource { get; set; }
        /// <summary>
        /// 
        /// </summary>
        string FieldBindProperty { get; set; }
        /// <summary>
        /// 获取或设置字段是否为只读。
        /// </summary>
        bool ReadOnly { get; set; }
        #endregion

        #region 方法
        /// <summary>
        /// 字段数据绑定
        /// </summary>
        void FieldDataBind();
        /// <summary>
        /// 验证字段
        /// </summary>
        void FieldValidate();
        #endregion
    }
}
